package com.kstudio.ksnapshot.klist;

import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.kstudio.ksnapshot.R;
import com.kstudio.ksnapshot.view.KSubIconView;

public class KListViewWrapper {
    private View Base;

    private KSubIconView SubIcon;

    private TextView Name;

    private LinearLayout execution;
    private TextView Duration;

    public KListViewWrapper(View base) {
        Base = base;

        SubIcon = null;
        Name = null;
        execution = null;
        Duration = null;
    }

    public KSubIconView getSubIcon() {
        if(SubIcon == null) {
            SubIcon = (KSubIconView)Base.findViewById(R.id.klist_row_icon);
        }
        return SubIcon;
    }

    public TextView getName() {
        if(Name == null) {
            Name = (TextView)Base.findViewById(R.id.klist_row_title);
        }
        return Name;
    }

    public LinearLayout getExecution() {
        if(execution == null) {
            execution = (LinearLayout)Base.findViewById(R.id.klist_row_execution);
        }
        return execution;
    }

    public TextView getDuration() {
        if(Duration == null) {
            Duration = (TextView)Base.findViewById(R.id.klist_row_duration);
        }
        return Duration;
    }
}